% http://tex.stackexchange.com/questions/321740/matlab2tikz-problem-with-contourf
\documentclass{article}

\usepackage{pgfplots}
\usepgfplotslibrary{colorbrewer,patchplots}
\pgfplotsset{compat=1.14}

\begin{document}
\begin{tikzpicture}
\begin{axis}[view={0}{90},colorbar as legend,]
    \addplot3[
        contour filled={
           levels={0.02,0.05,0.07,0.1,0.2,0.3,0.4,0.5,0.7,},
        },
		patch type=bilinear,
		domain=-2.7:2.7,
	]
	{exp(-x^2-y^2)};
\end{axis}
\end{tikzpicture}


\end{document}

